//============================================================================
// Name        : problem174.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

int count(int * const solutions, int n){
	int result = 0;
	for(int i = 2; i < 250000; i++) {
		if (solutions[i] == n)
			result++;
	}
	return result;
}

int main() {
	int innerLen, tiles, width;
	int solutions[250000] = {0};
	for(innerLen = 1; innerLen<250000; innerLen++){
		for(width = 1; width < 500; width++){
			tiles = 4*width*(width + innerLen);
			if (tiles > 1000000) break;
			solutions[tiles/4]++;

		}
	}
	long int sum = 0;
	for (int i = 1; i <= 10; i++) {
		sum += count(solutions, i);
	}
	cout<<sum<<endl;
	return 0;
}
